$(function () {
    /*
    * 获取购物车列表
    * */
    $.ajax({
        type: "get",
        url: config.baseUrl + "carts/getCartList.json",
        data: {userId:config.getUserId()},
        dataType: "json",
        success: function (data) {
            var temp = template('cart-template',data);
            $("#cart-content").html(temp);
        }
    })

    /**
     * 删除购物车中的商品
     * */
    /*var userId = sessionStorage.getItem("userId");
    var param = {
        userId: "1",
        shoppingCartType: "0"
    }
    $.ajax({
        type: "post",
        url: url + "cart/getShoppingCart.json",
        data: param,
        dataType: "json",
        success: function (data) {
            var temp = template('cart-template',data);
            $("#cart-content").html(temp);
        }
    })*/

})
